package com.example.barcodeapp.persenter.home;

import com.example.barcodeapp.base.BasePersenter;
import com.example.barcodeapp.bean.YanZhengMaBean;
import com.example.barcodeapp.common.CommonSubscriber;
import com.example.barcodeapp.interfaces.home.IHome;
import com.example.barcodeapp.interfaces.home.YanZhengMa;
import com.example.barcodeapp.model.HttpManager;
import com.example.barcodeapp.utils.RxUtils;

public class YanZhengMaPersenter extends BasePersenter<YanZhengMa.View> implements YanZhengMa.Persenter {

    @Override
    public void homeyanzhengma() {

        addSubscribe(HttpManager.getInstance().getTpApi().getYanZhengMa()
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<YanZhengMaBean>(mView) {
                    @Override
                    public void onNext(YanZhengMaBean hanFuDaBean) {
                        mView.homeyanzhengma(hanFuDaBean);
                    }
                }));
    }
}
